<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h3>年龄:{{ age }}</h3>
    <input type="button" value="点我长大" v-on:click="add_age">
</div>
<script src="js/vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            age: 18,
        },
        methods: {
            add_age: function () {
                console.log(this.age);
                this.age++;
                console.log(this.age)

            }
        }
    })
</script>
</body>
</html>